<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html class="pixel-ratio-1">
<head>
<title></title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

<meta name="description" content="">

<link rel="stylesheet" href="${ctx }/templates/default/skins/default/h5/lib/weui.min.css">
<link rel="stylesheet" href="${ctx }/templates/default/skins/default/h5/css/jquery-weui.css">
<link rel="stylesheet" href="${ctx }/templates/default/skins/default/h5/css/lehe.css">

</head>

<body ontouchstart="">
${errorDescribe }
    <br />
<div class="weui-flex" style="height: 180px;background-image:url(${ctx }/upload/down_body_bg.png);display: flex;align-items: center;">
    <div class="weui-flex__item">
        <a href="javascript:isWinxinTip(1);"> 
            <div class="update_time">更新:2018.04.01(24.5M)</div>
            <img src="${ctx }/upload/down_bt_android.png" alt="">
        </a>
    </div>
</div>

    <br />
    
<div class="weui-flex" style="height: 180px;background-image:url(${ctx }/upload/down_body_bg.png);display: flex;align-items: center;">
   
    <div class="weui-flex__item" style="margin: 0.5rem;">
        <a href="javascript:isWinxinTip(2);">
            <div class="update_time"></div>
            <img src="${ctx }/upload/down_bt_ios.png" alt="">
        </a>
    </div>
</div>
	
    <div class="weui-msg__extra-area">
        <div class="weui-footer">
            <p class="weui-footer__links">
                <a href="javascript:void(0);" class="weui-footer__link"></a>
            </p>
            <p class="weui-footer__text">Copyright © 2016-2017</p>
        </div>
    </div>
</div>
<script type="text/javascript">
    //var isWeixin = is_weixin();
    var winHeight = typeof window.innerHeight != 'undefined' ? window.innerHeight : document.documentElement.clientHeight;
    function isWinxinTip(type) {
    	if(!is_weixin()){
    		if(type==1){
    			window.location.href = "http://dlxh.v80mall.com/XianHuanYX_V_100.apk";
    		}else{
    			window.location.href = "itms-services://?action=download-manifest&url=https://xhgame888.oss-cn-shenzhen.aliyuncs.com/xhgame.plist";
    		}
    		return;
    	}
        var cssText = "#weixin-tip{position: fixed; left:0; top:0; background: rgba(0,0,0,0.8); filter:alpha(opacity=80); width: 100%; height:100%; z-index: 100;} #weixin-tip p{text-align: center; margin-top: 10%; padding:0 5%;}";
        //if(isWeixin){
            loadHtml();
            loadStyleText(cssText);
            return false;
        //}
    }

    function is_weixin() {
        var ua = navigator.userAgent.toLowerCase();
        if (ua.match(/MicroMessenger/i) == "micromessenger") {
            return true;
        } else {
            return false;
        }
    }
    function loadHtml(){
        var div = document.createElement('div');
        div.id = 'weixin-tip';
        div.innerHTML = '<p><img src="${ctx }/templates/default/skins/default/h5/images/live_weixin.png" alt="微信打开"/></p>';
        document.body.appendChild(div);
    }

    function loadStyleText(cssText) {
        var style = document.createElement('style');
        style.rel = 'stylesheet';
        style.type = 'text/css';
        try {
            style.appendChild(document.createTextNode(cssText));
        } catch (e) {
            style.styleSheet.cssText = cssText; //ie9以下
        }
        var head=document.getElementsByTagName("head")[0]; //head标签之间加上style样式
        head.appendChild(style);
    }
</script>
<script src="${ctx }/templates/default/skins/default/h5/lib/jquery-2.1.4.js"></script>
<script src="${ctx }/templates/default/skins/default/h5/lib/fastclick.js"></script>
<script>
    $(function() {
        FastClick.attach(document.body);
    });
</script>
<script src="${ctx }/templates/default/skins/default/h5/js/jquery-weui.js"></script>
	
	<script src="${ctx }/templates/default/skins/default/h5/js/jquery-weui.js"></script>

</body>
</html>